﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace LiteLauncher.WIndow_Form
{
    /// <summary>
    /// Install_information_window.xaml 的交互逻辑
    /// </summary>
    public partial class Install_information_window : Window
    {
        public Install_information_window(string title, string content)
        {
            InitializeComponent();
            this.Title = title;
            this.Informathon.Text = content;
        }
        // 更新日志的方法
        public void AppendLog(string logMessage)
        {
            if (!Informathon.CheckAccess())
            {
                Informathon.Dispatcher.Invoke(() => AppendLog(logMessage));
                return;
            }

            Informathon.AppendText(logMessage + Environment.NewLine);
            Informathon.ScrollToEnd(); // 自动滚动到底部
        }
    }
}
